<meta charset="UTF-8">

<div class="commoninfodiv">
    <div class="sectionheader">
        Информация о пользователе:
    </div>
    <?php
    include_once("../functions/db_manipulate.php");

    if (!init()) {
        redirect("login.php");
    }

    $user = getUserInfo($_SESSION['id']);
    ?>
    <form action="profile/handler_info.php" method="POST" accept-charset="UTF-8" id="infoform">
        <div class="userinfosuperdiv">
            <div class="userinfodiv">
                Ник:
            </div>
            <div class="userinfodiv">
                <input class="updateuserinfoinput" type="text" maxlength="20" required="true" name="nick"
                       value="<?= $user['nick'] ?>">
            </div>
        </div>
        <input type="hidden" name="oldnick" value="<?= $user['nick'] ?>">
        <input type="hidden" name="oldmail" value="<?= $user['email'] ?>">

        <div class="userinfosuperdiv">
            <div class="userinfodiv">
                Имя:
            </div>
            <div class="userinfodiv">
                <input class="updateuserinfoinput" type="text" maxlength="50" required="true" name="firstname"
                       value="<?= $user['firstname'] ?>">
            </div>
        </div>
        <div class="userinfosuperdiv">
            <div class="userinfodiv">
                Фамилия:
            </div>
            <div class="userinfodiv">
                <input class="updateuserinfoinput" type="text" maxlength="50" required="true" name="lastname"
                       value="<?= $user['lastname'] ?>">
            </div>
        </div>
        <div class="userinfosuperdiv">
            <div class="userinfodiv">
                Почта:
            </div>
            <div class="userinfodiv">
                <input class="updateuserinfoinput" type="text" maxlength="40" required="true" name="email"
                       value="<?= $user['email'] ?>">
            </div>
        </div>
        <div class="userinfosuperdiv">
            <div class="userinfodiv">
                ICQ:
            </div>
            <div class="userinfodiv">
                <input class="updateuserinfoinput" type="text" maxlength="20" required="true" name="icq"
                       value="<?= $user['icq'] ?>">
            </div>
        </div>
        <div class="userinfosuperdiv">
            <div class="userinfodiv">
                Skype:
            </div>
            <div class="userinfodiv">
                <input class="updateuserinfoinput" type="text" maxlength="10" required="true" name="skype"
                       value="<?= $user['skype'] ?>">
            </div>
        </div>
        <div class="userinfosuperdiv">
            <div class="userinfodiv">
                Телефон:
            </div>
            <div class="userinfodiv">
                <input class="updateuserinfoinput" type="text" maxlength="20" required="true" name="mobile"
                       value="<?= $user['mobile'] ?>">
            </div>
        </div>
        <div class="userinfosuperdiv">
            <div class="userinfodiv">
                Адрес:
            </div>

            <div class="userinfodiv">
                <input class="updateuserinfoinput" type="text" maxlength="40" required="true" name="address"
                       value="<?= $user['address'] ?>">
            </div>
        </div>
        <div class="userinfosuperdiv">
            <div class="userinfodiv">
                Методы ловли:
            </div>
            <div class="userinfodiv">
                <input class="updateuserinfoinput" type="text" maxlength="20" required="true" name="methods"
                       value="<?= $user['methods'] ?>">
            </div>
        </div>
        <div class="userinfosuperdiv">
            <div class="userinfodiv">
                Дата рождения:
            </div>
            <div class="userinfodiv">
                <input class="updateuserinfoinput" type="date" maxlength="10" required="true" name="birth"
                       value="<?= $user['birth'] ?>">
            </div>
        </div>
        <div class="profileimgbutton" onclick="$('#infoform').submit()">
            Продолжить
        </div>
    </form>
</div>